package cn.changeforyou.analyzer.javaparse;

import cn.changeforyou.utils.cons.DateTimeUtils;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public abstract class SuperModel<T extends Model<?>> extends Model<T> implements Serializable {

    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    @JsonFormat(pattern = DateTimeUtils.DATE_TIME_STANDARD_FORMATE_STR, timezone = "GMT+8")
    private String createTime;

    @JsonIgnore
    @JsonFormat(pattern = DateTimeUtils.DATE_TIME_STANDARD_FORMATE_STR, timezone = "GMT+8")
    private String updateTime;

    @TableLogic
    @JsonIgnore
    private Integer del;

}
